/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "operadora_cartao")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "OperadoraCartao.findAll", query = "SELECT o FROM OperadoraCartao o")})
public class OperadoraCartao implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(length = 30)
    private String bandeira;
    @Column(length = 50)
    private String nome;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "TAXA_ADM", precision = 18, scale = 6)
    private BigDecimal taxaAdm;
    @Column(name = "TAXA_ADM_DEBITO", precision = 18, scale = 6)
    private BigDecimal taxaAdmDebito;
    @Column(name = "VALOR_ALUGUEL_POS_PIN", precision = 18, scale = 6)
    private BigDecimal valorAluguelPosPin;
    @Column(name = "VENCIMENTO_ALUGUEL")
    private Integer vencimentoAluguel;
    @Column(length = 14)
    private String fone1;
    @Column(length = 14)
    private String fone2;
    @JoinColumn(name = "ID_CONTABIL_CONTA", referencedColumnName = "ID")
    @ManyToOne
    private ContabilConta idContabilConta;
    @JoinColumn(name = "ID_CONTA_CAIXA", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private ContaCaixa idContaCaixa;

    public OperadoraCartao() {
    }

    public OperadoraCartao(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getBandeira() {
        return bandeira;
    }

    public void setBandeira(String bandeira) {
        this.bandeira = bandeira;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public BigDecimal getTaxaAdm() {
        return taxaAdm;
    }

    public void setTaxaAdm(BigDecimal taxaAdm) {
        this.taxaAdm = taxaAdm;
    }

    public BigDecimal getTaxaAdmDebito() {
        return taxaAdmDebito;
    }

    public void setTaxaAdmDebito(BigDecimal taxaAdmDebito) {
        this.taxaAdmDebito = taxaAdmDebito;
    }

    public BigDecimal getValorAluguelPosPin() {
        return valorAluguelPosPin;
    }

    public void setValorAluguelPosPin(BigDecimal valorAluguelPosPin) {
        this.valorAluguelPosPin = valorAluguelPosPin;
    }

    public Integer getVencimentoAluguel() {
        return vencimentoAluguel;
    }

    public void setVencimentoAluguel(Integer vencimentoAluguel) {
        this.vencimentoAluguel = vencimentoAluguel;
    }

    public String getFone1() {
        return fone1;
    }

    public void setFone1(String fone1) {
        this.fone1 = fone1;
    }

    public String getFone2() {
        return fone2;
    }

    public void setFone2(String fone2) {
        this.fone2 = fone2;
    }

    public ContabilConta getIdContabilConta() {
        return idContabilConta;
    }

    public void setIdContabilConta(ContabilConta idContabilConta) {
        this.idContabilConta = idContabilConta;
    }

    public ContaCaixa getIdContaCaixa() {
        return idContaCaixa;
    }

    public void setIdContaCaixa(ContaCaixa idContaCaixa) {
        this.idContaCaixa = idContaCaixa;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OperadoraCartao)) {
            return false;
        }
        OperadoraCartao other = (OperadoraCartao) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.OperadoraCartao[ id=" + id + " ]";
    }
    
}
